package ResponsibilityChain;

/**
 * @author duanzhizhou
 * @date 2024/11/5
 */
public class GeneralManager extends Manager{
    public GeneralManager(String name) {
        super(name);
    }
    
    @Override
    protected void handle(BizRequest request) {
        if ("请假".equals(request.getType())) {
            System.out.println(getName() + ": 批准" + request.getContent() + request.getNum() + "天");
        } else if ("加薪".equals(request.getType())){
            if (request.getNum() <= 5000) {
                System.out.println(getName() + ": 批准" + request.getContent() + request.getNum() + "元");
            } else {
                System.out.println(getName() + ": " + request.getContent() + request.getNum() + "元, 再说吧");
            }
        }
    }
}
